{% extends "base.html" %}
{% load crispy_forms_filters %}
{% load i18n %}
{% load account %}
{% load crispy_forms_tags %}

{% block title %}{% trans "重置密码" %}{% endblock %}

{% block content %}
<div class="container py-5">
  <div class="row justify-content-center">
    <div class="col-md-6">
      <div class="card shadow">
        <div class="card-header bg-primary text-white">
          <h1 class="h4 mb-0">{% trans "重置密码" %}</h1>
        </div>
        <div class="card-body">
          {% if user.is_authenticated %}
          {% include "account/snippets/already_logged_in.html" %}
          {% endif %}

          <p>{% trans "忘记密码了？请输入您的电子邮件地址，我们将向您发送重置密码的链接。" %}</p>

          <form method="POST" action="{% url 'account_reset_password' %}" class="password_reset">
            {% csrf_token %}
            {{ form|crispy }}
            <button class="btn btn-primary w-100 mt-3" type="submit">{% trans "重置密码" %}</button>
          </form>
        </div>
      </div>
    </div>
  </div>
</div>
{% endblock %}

